package com.cmc.cloud.cmclink.doc.api.document;

import com.cmc.cloud.cmclink.doc.api.document.rep.BaseCodeRpcRepDto;
import com.cmc.cloud.cmclink.doc.api.document.req.BaseCodeRpcReqDto;
import com.cmc.cloud.cmclink.doc.constant.DocApiConstants;
import com.cmes.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @author 周贤
 * @decr 运输条款基础数据对外查询 api
 * @date 2025/3/12
 */
@FeignClient(name = DocApiConstants.NAME)
@Tag(name = "RPC 服务 - 单证基础数据对外接口服务")
public interface BaseCodeQueryApi {

    String PREFIX = DocApiConstants.PREFIX + "/baseCode";

    /**
     * 根据基础数据编码类型等查询基础数据
     *
     * @param dto 编码类型
     * @return 单证基础数据
     */
    @PostMapping(PREFIX + "/query")
    @Operation(summary = "基础数据列表查询  coe类型必传")
    CommonResult<List<BaseCodeRpcRepDto>> query(@Valid @RequestBody BaseCodeRpcReqDto dto);
}
